package com.jzsec.proxy.jzsecproxy;

import com.jzsec.proxy.jzsecproxy.consumer.RedisMsgConsumer;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.WebApplicationType;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;

@SpringBootApplication
public class LeancloudProxyApplication implements CommandLineRunner {

	@Autowired
	private RedisMsgConsumer redisMsgConsumer;

	public static void main(String[] args) {
		//		SpringApplication.run(LeancloudProxyApplication.class, args);
		new SpringApplicationBuilder(LeancloudProxyApplication.class).web(WebApplicationType.NONE).run(args);

	}

	@Override
	public void run(String... strings) throws Exception {
		redisMsgConsumer.start();
	}
}
